git apply does not honor diff.noprefix config setting

2018-05-19 Thread hIpPy
If I disable mnemonic prefix, $ git config --global diff.noprefix true and do a round-trip of format-patch and apply, $ git format-patch -1 @ $ git apply git apply fails with, error: git diff header lacks filename information when removing 1 leading pathname component (line 16) Without

git rebase -i --exec and changing directory

2018-05-19 Thread Ondrej Mosnáček
Hello, I am trying to run a script to edit multiple commits using 'git rebase -i --exec ...' and I ran into a strange behavior when I run 'cd' inside the --exec command and subsequently run a git command. For example, if the command is 'cd src && git status', then git status reports as if all

Re: [PATCH 5/5] merge-recursive: simplify handle_change_delete

2018-05-19 Thread Elijah Newren
On Sat, May 19, 2018 at 12:32 AM, Johannes Sixt wrote: > Am 19.05.2018 um 04:07 schrieb Elijah Newren: >> >> There is really no need for four branches of nearly identical messages >> when we can store the differences into small variables before printing. > > Oh, there is a reason

Re: Re :[PATCHv4 1/1] git-p4: add unshelve command

2018-05-19 Thread Luke Diamand
On 19 May 2018 at 12:26, merlo...@yahoo.fr wrote: > Hi Luke, > > In the P4Unshelve classe, could you add an help description directly in the > optparse.add_option of --origin ? Sure. I'll do a re-roll. > > From the workfow point of you, do you think it will be possible to

Re: error(?) in "man git-stash" regarding "--keep-index"

2018-05-19 Thread Sybille Peters
On 18.05.2018 19:14, Martin Ågren wrote: On 18 May 2018 at 17:43, Robert P. J. Day wrote: ... Ah, this is about saving to the stash vs stashing away. The latter is what `git stash` is all about -- stashing changes *away*. At least according to my mental model and the

[PATCHv4 0/1] git-p4: unshelving: fix for python2.6

2018-05-19 Thread Luke Diamand
This is the same as the previous unshelve change, other than fixing the "{}".format(foo) constructs I introduced to be compatible with Python2.6. https://marc.info/?l=git=152637850403462 Python2.6 doesn't understand empty format fields ("{}"), so I have added element indexes, e.g.

[PATCHv4 1/1] git-p4: add unshelve command

2018-05-19 Thread Luke Diamand
This can be used to "unshelve" a shelved P4 commit into a git commit. For example: $ git p4 unshelve 12345 The resulting commit ends up in the branch: refs/remotes/p4/unshelved/12345 If that branch already exists, it is renamed - for example the above branch would be saved as

Re: [PATCH 3/5] query_fsmonitor: use xsnprintf for formatting integers

2018-05-19 Thread René Scharfe
Am 19.05.2018 um 03:57 schrieb Jeff King: > These formatted integers should always fit into their > 64-byte buffers. Let's use xsnprintf() to add an assertion > that this is the case, which makes auditing for other > unchecked snprintfs() easier. How about this instead? -- >8 -- Subject: [PATCH]

Re: [PATCH 5/5] merge-recursive: simplify handle_change_delete

2018-05-19 Thread Johannes Sixt
Am 19.05.2018 um 04:07 schrieb Elijah Newren: There is really no need for four branches of nearly identical messages when we can store the differences into small variables before printing. Oh, there is a reason for the repeated message text: translations! Please do not play sentence Lego with

Re: [PATCH 00/11]

2018-05-19 Thread Duy Nguyen
On Wed, May 16, 2018 at 03:21:07PM -0700, Stefan Beller wrote: > > If you have time, yes translate them all. I don't see how any of these > > strings are meant for script. If not, just _() the new string you > > added is fine. > > > With a majority of call sites dying like this though, I wonder

Re: [PATCH 11/11] read_cache: convert most calls to repo_read_index_or_die

2018-05-19 Thread Duy Nguyen
On Wed, May 16, 2018 at 03:27:33PM -0700, Brandon Williams wrote: > Maybe we can kill read_cache() while at it? I took this out of context. But with the move to repo_* stuff, eventually these macros around the_index should die. Not today though. -- Duy

Re: [PATCH 11/11] read_cache: convert most calls to repo_read_index_or_die

2018-05-19 Thread Duy Nguyen
On Wed, May 16, 2018 at 03:21:18PM -0700, Stefan Beller wrote: This commit may need some more explanation. It's not always safe to replace "read_cache();" with "repo_read_index_or_die();" and you do sometimes avoid that variant. While I agree _or_die() is the right thing to do most of the time.

Re: [PATCH 02/11] repository: introduce repo_read_index_or_die

2018-05-19 Thread Duy Nguyen
On Wed, May 16, 2018 at 03:21:09PM -0700, Stefan Beller wrote: > A common pattern with the repo_read_index function is to die if the return > of repo_read_index is negative. Move this pattern into a function. > > This patch replaces the calls of repo_read_index with its _or_die version, > if the

Re: [PATCH v3 3/3] unpack_trees_options: free messages when done

2018-05-19 Thread Martin Ågren
On 19 May 2018 at 03:02, Jeff King wrote: > On Fri, May 18, 2018 at 03:30:44PM -0700, Elijah Newren wrote: > >> > would become: >> > >> > msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOUPTODATE_FILE] = >> > string_list_appendf(>msgs_to_free, msg, cmd, cmd)->string; >> > >> >