git-gui: Revert "git-gui: Display all authors of git-gui." This reverts commit 871f4c97ad7e021d1a0a98c80c5da77fcf70e4af.
git-gui: Revert "git-gui: Display all authors of git-gui." This reverts commit 871f4c97ad7e021d1a0a98c80c5da77fcf70e4af. Too many users have complained about the credits generator in git-gui, so I'm backing the entire thing out. This revert will finish that series. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Mar 12, 2007 at 13:26 UTC
bb616ddd159508e6c6469626d494a69e28da7032
4 files changed
+9
-135
.gitignore
-1
@@ -1,4 +1,3 @@
1
-CREDITS-FILE
1
GIT-VERSION-FILE
2
git-citool
3
git-gui
CREDITS-GEN
deleted
-58
@@ -1,58 +0,0 @@
1
-#!/bin/sh
2
-
3
-CF=CREDITS-FILE
4
-tip=
5
-
6
-tree_search ()
7
-{
8
- head=$1
9
- tree=$2
10
- for p in $(git rev-list --parents --max-count=1 $head 2>/dev/null)
11
- do
12
- test $tree = $(git rev-parse $p^{tree} 2>/dev/null) &&
13
- vn=$(git describe --abbrev=4 $p 2>/dev/null) &&
14
- case "$vn" in
15
- gitgui-[0-9]*) echo $p; break;;
16
- esac
17
- done
18
-}
19
-
20
-generate_credits ()
21
-{
22
- tip=$1 &&
23
- rm -f $CF &&
24
- git shortlog -n -s $tip | sed 's/: .*$//' >$CF || exit
25
-}
26
-
27
-# Always use the tarball credits file if found, just
28
-# in case we are somehow contained in a larger git
29
-# repository that doesn't actually track our state.
30
-# (At least one package manager is doing this.)
31
-#
32
-# We may be a subproject, so try looking for the merge
33
-# commit that supplied this directory content if we are
34
-# not at the toplevel. We probably will always be the
35
-# second parent in the commit, but we shouldn't rely on
36
-# that fact.
37
-#
38
-
39
-if test -f credits
40
-then
41
- rm -f $CF &&
42
- cp credits $CF || exit
43
-elif prefix="$(git rev-parse --show-prefix 2>/dev/null)" &&
44
- test -n "$prefix" &&
45
- head=$(git rev-list --max-count=1 HEAD -- . 2>/dev/null) &&
46
- tree=$(git rev-parse --verify "HEAD:$prefix" 2>/dev/null) &&
47
- tip=$(tree_search $head $tree) &&
48
- test -n "$tip"
49
-then
50
- generate_credits $tip || exit
51
-elif tip="$(git rev-parse --verify HEAD 2>/dev/null)" &&
52
- test -n "$tip"
53
-then
54
- generate_credits $tip || exit
55
-else
56
- echo "error: Cannot locate authorship information." >&2
57
- exit 1
58
-fi
Makefile
+9
-14
@@ -7,8 +7,9 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
7
@$(SHELL_PATH) ./GIT-VERSION-GEN
8
-include GIT-VERSION-FILE
9
10
+SCRIPT_SH = git-gui.sh
11
GITGUI_BUILT_INS = git-citool
11
-ALL_PROGRAMS = git-gui $(GITGUI_BUILT_INS)
12
+ALL_PROGRAMS = $(GITGUI_BUILT_INS) $(patsubst %.sh,%,$(SCRIPT_SH))
13
14
ifndef SHELL_PATH
15
SHELL_PATH = /bin/sh
@@ -31,24 +32,20 @@ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
32
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
33
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
34
34
-git-gui: git-gui.sh GIT-VERSION-FILE CREDITS-FILE
35
+$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
36
$(QUIET_GEN)rm -f $@ $@+ && \
36
- sed -n \
37
- -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
37
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
38
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
39
- -e '1,/^set gitgui_credits /p' \
39
$@.sh >$@+ && \
41
- cat CREDITS-FILE >>$@+ && \
42
- sed -e '1,/^set gitgui_credits /d' $@.sh >>$@+ && \
40
chmod +x $@+ && \
41
mv $@+ $@
42
46
-CREDITS-FILE: CREDITS-GEN .FORCE-CREDITS-FILE
47
- $(QUIET_GEN)$(SHELL_PATH) ./CREDITS-GEN
48
-
43
$(GITGUI_BUILT_INS): git-gui
44
$(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
45
46
+# These can record GITGUI_VERSION
47
+$(patsubst %.sh,%,$(SCRIPT_SH)): GIT-VERSION-FILE
48
+
49
all:: $(ALL_PROGRAMS)
50
51
install: all
@@ -56,14 +53,12 @@ install: all
53
$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
54
$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
55
59
-dist-version: CREDITS-FILE
56
+dist-version:
57
@mkdir -p $(TARDIR)
58
@echo $(GITGUI_VERSION) > $(TARDIR)/version
62
- @cat CREDITS-FILE > $(TARDIR)/credits
59
60
clean::
65
- rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE CREDITS-FILE
61
+ rm -f $(ALL_PROGRAMS) GIT-VERSION-FILE
62
63
.PHONY: all install dist-version clean
64
.PHONY: .FORCE-GIT-VERSION-FILE
69
-.PHONY: .FORCE-CREDITS-FILE
git-gui.sh
-62
@@ -19,9 +19,6 @@ GNU General Public License for more details.
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
22
-set gitgui_credits {
23
-Paul Mackerras
24
-}
22
23
######################################################################
24
##
@@ -4492,61 +4489,6 @@ proc do_commit {} {
4489
commit_tree
4490
}
4491
4495
-proc do_credits {} {
4496
- global gitgui_credits
4497
-
4498
- set w .credits_dialog
4499
-
4500
- toplevel $w
4501
- wm geometry $w "+[winfo rootx .]+[winfo rooty .]"
4502
-
4503
- label $w.header -text {git-gui Contributors} -font font_uibold
4504
- pack $w.header -side top -fill x
4505
-
4506
- frame $w.buttons
4507
- button $w.buttons.close -text {Close} \
4508
- -font font_ui \
4509
- -command [list destroy $w]
4510
- pack $w.buttons.close -side right
4511
- pack $w.buttons -side bottom -fill x -pady 10 -padx 10
4512
-
4513
- frame $w.credits
4514
- text $w.credits.t \
4515
- -background [$w.header cget -background] \
4516
- -yscrollcommand [list $w.credits.sby set] \
4517
- -width 20 \
4518
- -height 10 \
4519
- -wrap none \
4520
- -borderwidth 1 \
4521
- -relief solid \
4522
- -padx 5 -pady 5 \
4523
- -font font_ui
4524
- scrollbar $w.credits.sby -command [list $w.credits.t yview]
4525
- pack $w.credits.sby -side right -fill y
4526
- pack $w.credits.t -fill both -expand 1
4527
- pack $w.credits -side top -fill both -expand 1 -padx 5 -pady 5
4528
-
4529
- label $w.desc \
4530
- -text "All portions are copyrighted by their respective authors
4531
-and are distributed under the GNU General Public License." \
4532
- -padx 5 -pady 5 \
4533
- -justify left \
4534
- -anchor w \
4535
- -borderwidth 1 \
4536
- -relief solid \
4537
- -font font_ui
4538
- pack $w.desc -side top -fill x -padx 5 -pady 5
4539
-
4540
- $w.credits.t insert end "[string trim $gitgui_credits]\n"
4541
- $w.credits.t conf -state disabled
4542
- $w.credits.t see 1.0
4543
-
4544
- bind $w <Visibility> "grab $w; focus $w"
4545
- bind $w <Key-Escape> [list destroy $w]
4546
- wm title $w [$w.header cget -text]
4547
- tkwait window $w
4548
-}
4549
-
4492
proc do_about {} {
4493
global appvers copyright
4494
global tcl_patchLevel tk_patchLevel
@@ -4563,10 +4505,6 @@ proc do_about {} {
4505
button $w.buttons.close -text {Close} \
4506
-font font_ui \
4507
-command [list destroy $w]
4566
- button $w.buttons.credits -text {Contributors} \
4567
- -font font_ui \
4568
- -command do_credits
4569
- pack $w.buttons.credits -side left
4508
pack $w.buttons.close -side right
4509
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
4510