Unhelpful "branch.master.remote = <nickname>" advice?

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Unhelpful "branch.master.remote = <nickname>" advice?

From: Jan Nieuwenhuizen <hidden>
Date: 2016-06-15 22:47:42

Hi,

git pull -r*) URL says:

    If you often merge with the same branch, you may want to
    configure the following variables in your configuration
    file:

        branch.master.remote = <nickname>
        branch.master.merge = <remote-ref>
        remote.<nickname>.url = <url>
        remote.<nickname>.fetch = <refspec>

and after cut-and-pasting that into .git/config, replacing
<foo> with values, I get

    $ git pull -r http://github.com/../../master
    fatal: bad config file line 17 in .git/config

where line 17 is [without any indentation]

    branch.master.remote = eddy

This is with git version version 1.6.3.3

Greetings,
Jan.  -- who just finds out the uninstall target is missing?!?
	 See attached.

*) I've been wondering why GIT lacks a "update", ie
   pull-without-merge command.  You almost never want
   to git pull /without/ -r?

-- 
Jan Nieuwenhuizen [off-list ref] | GNU LilyPond - The music typesetter
Avatar®: http://AvatarAcademy.nl    | http://lilypond.org

Re: Unhelpful "branch.master.remote = <nickname>" advice?

From: Tomas Carnecky <hidden>
Date: 2016-06-15 22:47:42

On Nov 11, 2009, at 2:22 PM, Jan Nieuwenhuizen wrote:
Hi,

git pull -r*) URL says:

   If you often merge with the same branch, you may want to
   configure the following variables in your configuration
   file:

       branch.master.remote = <nickname>
       branch.master.merge = <remote-ref>
       remote.<nickname>.url = <url>
       remote.<nickname>.fetch = <refspec>
These are meant to be used with git-config(1):
git config branch.master.remote <nickname>

Or if you want to manually edit the config file, add this:

[branch "master"]
     remote = <nickname>

etc.
and after cut-and-pasting that into .git/config, replacing
<foo> with values, I get

   $ git pull -r http://github.com/../../master
   fatal: bad config file line 17 in .git/config

where line 17 is [without any indentation]

   branch.master.remote = eddy

This is with git version version 1.6.3.3

Greetings,
Jan.  -- who just finds out the uninstall target is missing?!?
	 See attached.
Next time please send patches inline, it's easier to review them that  
way.
*) I've been wondering why GIT lacks a "update", ie
  pull-without-merge command.  You almost never want
  to git pull /without/ -r?
As 'pull == fetch + merge' (pull -r == fetch + rebase), pull without  
merge would be fetch.

tom

Re: Unhelpful "branch.master.remote = <nickname>" advice?

From: Jan Krüger <hidden>
Date: 2016-06-15 22:47:42

Hi,
git pull -r*) URL says: [...]
        branch.master.remote = <nickname>
and after cut-and-pasting that into .git/config, replacing
<foo> with values, I get [...]
    fatal: bad config file line 17 in .git/config
where line 17 is [without any indentation]
    branch.master.remote = eddy
The confusion is that while you can set values with this syntax if
you're using git config (git config branch.master.remote <some value>),
they're written differently in actual config files:

  [branch "master"]
  remote = <nickname>
  merge = <remote-ref>
  
  [remote "<nickname>"]
  url = <url>
  fetch = <refspec>

I can't think of a message of comparable length that would make this
clearer, though.
Jan.  -- who just finds out the uninstall target is missing?!?
	 See attached.
I have no comments about the patch contents themselves, but please read
Documentation/SubmittingPatches. Most importantly, patches are
usually sent inline here, and without a signoff line they can't be
accepted for inclusion in the official repository.
*) I've been wondering why GIT lacks a "update", ie
   pull-without-merge command.  You almost never want
   to git pull /without/ -r?
-r stands for "rebase", i.e. it makes git pull use rebase instead of
merge. Rebase has certain problematic implications for decentralized
development, which is why it should only really be used in specific
circumstances (for rebasing commits that haven't been published in any
way yet).

"You" may almost never want to use git pull without rebase, but "many
others" do, and very often. Personally, I donn't recall a single
occasion where I have used git pull --rebase (not counting git-svn
stuff).

Anyway, look at config options branch.autosetuprebase and
branch.<nickname>.rebase to see how you can make pull use rebase by
default.

-Jan

[PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners.

From: Jan Nieuwenhuizen <hidden>
Date: 2016-06-15 22:47:44

Op woensdag 11-11-2009 om 15:08 uur [tijdzone +0100], schreef Tomas
Carnecky:
quoted
Greetings,
Jan.  -- who just finds out the uninstall target is missing?!?
	 See attached.
Next time please send patches inline, it's easier to review them that  
way.
Sorry.  Let me retry that.  See below.

Greetings,
Jan.

-- 
Jan Nieuwenhuizen [off-list ref] | GNU LilyPond - The music typesetter
Avatar®: http://AvatarAcademy.nl    | http://lilypond.org
From f260a4dcf0b42088eb1da74aee49f49ac4b0c55b Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <redacted>
Date: Wed, 11 Nov 2009 14:19:00 +0100
Subject: [PATCH] Makefile: add uninstall target.  Fixes elementary good cleaning manners.

   * Modified     Makefile
   * Modified     gitk-git/Makefile
   * Modified     perl/Makefile
   * Modified     templates/Makefile

Signed-off-by: Jan Nieuwenhuizen <redacted>
---
 Makefile           |   18 +++++++++++++++++-
 gitk-git/Makefile  |    2 ++
 perl/Makefile      |    2 +-
 templates/Makefile |    5 +++++
 4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5d5976f..135c3ac 100644
--- a/Makefile
+++ b/Makefile
@@ -1781,7 +1781,23 @@ quick-install-man:
 quick-install-html:
 	$(MAKE) -C Documentation quick-install-html
 
+bindir_PROGRAMS = git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X git-cvsserver
 
+uninstall:
+ifndef NO_TCLTK
+	$(MAKE) -C gitk-git uninstall
+	$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' uninstall
+endif
+ifndef NO_PERL
+	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' uninstall
+endif
+	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' uninstall
+	$(RM) $(ALL_PROGRAMS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+	$(RM) $(BUILT_INS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+	$(RM) $(OTHER_PROGRAMS:%='$(DESTDIR_SQ)$(gitexec_instdir_SQ)'/%)
+	-rmdir -p '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+	$(RM) $(bindir_PROGRAMS:%='$(DESTDIR_SQ)$(bindir_SQ)'/%)
+	-rmdir -p '$(DESTDIR_SQ)$(bindir_SQ)'
 
 ### Maintainer's dist rules
 
@@ -1857,7 +1873,7 @@ ifndef NO_TCLTK
 endif
 	$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
 
-.PHONY: all install clean strip
+.PHONY: all install uninstall clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
 .PHONY: .FORCE-GIT-BUILD-OPTIONS
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index e1b6045..d68f19a 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -47,6 +47,8 @@ install:: all
 uninstall::
 	$(foreach p,$(ALL_MSGFILES), $(RM) '$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) &&) true
 	$(RM) '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+	-rmdir -p '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+	-rmdir -p '$(DESTDIR_SQ)$(msgsdir_SQ)'
 
 clean::
 	$(RM) gitk-wish po/*.msg
diff --git a/perl/Makefile b/perl/Makefile
index 4ab21d6..25fc304 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -10,7 +10,7 @@ ifndef V
 	QUIET = @
 endif
 
-all install instlibdir: $(makfile)
+all install instlibdir uninstall: $(makfile)
 	$(QUIET)$(MAKE) -f $(makfile) $@
 
 clean:
diff --git a/templates/Makefile b/templates/Makefile
index 408f013..f4048d9 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -51,3 +51,8 @@ install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
 	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
+
+uninstall:
+	-(cd blt && find . -type f) | (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && xargs $(RM))
+	-(cd blt && find . -mindepth 1 -type d) | (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && xargs rmdir)
+	-rmdir -p '$(DESTDIR_SQ)$(template_instdir_SQ)'
-- 
1.6.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help